<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html><head>
<title>coregfx</title>
</head><body>
<p>[<a href="mxdoc.htm">mainpage</a>]
[<a href="tags.htm">tags</a>]<br>
<h1><a name="coregfx">module: coregfx</a></h1><p><b>The core DEGFX module</b><p>

This module contains the core DEGFX functions for drawing on the
screen and gettign input from the keyboard and the mouse.  
(<a href="../include/degfx/coregfx.h">../include/degfx/coregfx.h</a>)<p>Part of the <a href="degfx.htm">degfx</a> library.<ul><li>
<a name=" define MXSCREEN"><code># define MXSCREEN</code></a>
<p>
<p><b>Screen bitmap</b><p>
The macro MXSCREEN can be used to specify the screen redraw buffer.  
(<a href="../include/degfx/coregfx.h">../include/degfx/coregfx.h</a>)<p></li>
<li>
<a name="void mx_font_default(MX_FONT* font)"><code>void mx_font_default(MX_FONT* font)</code></a>
<p>
<p>The DEGFX system takes over ownership of the specified font.  This is
        done by creating a reference to the specified font marking the font
        for deletion.  So the font is guaranteed to be deleted as necessary
        whevener no objects have references to the font and a new default font
        is set.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)<p></li>
<li>
<a name="unsigned mx_gfx_start(MX_GFX_ARGS* userargs)"><code>unsigned mx_gfx_start(MX_GFX_ARGS* userargs)</code></a>
<p>
<p><b>Start DEGFX and set the graphics mode  </b><p>
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)

<p>If the requested mode has same size, depth, title and driver as
            the previous one then the graphics mode is not changed.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)

<p>If the arguments are 0 then default values are used.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)

<p>A NULL driver means use the current driver or if there is none, then
        use the default driver.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)

<p>Function returns 0 if gfx mode set failed.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)

<p>After successful mode set the screen area contains the screen dimensions.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)

<p>If a redraw buffer is specified any previous redraw buffer that was
        allocated will be deleted.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)

<p>If no redraw buffer specified then one will be allocated and locked.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)

<p>The session is incremented after every successfull mode set.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)

<p>The MX_GFX_ARGS struct (if present) is modified to the mode information
       actually set by the underlying driver.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)<p></li>
<li>
<a name="void mx_gfx_stop(void)"><code>void mx_gfx_stop(void)</code></a>
<p>
<p><b>Stop DEGFX</b><p>
This function stops the graphics mode and (depending on the driver)
probably returns to a text mode.  It can be called before the program return
to the operating system however if the user does not do this it will be
done automatically.   
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)

<p>The internal graphics redraw buffer is released.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)<p></li>
<li>
<a name="const MX_GFX_ARGS* mx_gfx_info(void)"><code>const MX_GFX_ARGS* mx_gfx_info(void)</code></a>
<p>
<p>This function returns information about the current graphics mode.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)<p></li>
<li>
<a name="void mx_gfx_redraw(MX_REDRAW_FUNC redraw)"><code>void mx_gfx_redraw(MX_REDRAW_FUNC redraw)</code></a>
<p>
<p>This function sets the redraw callback.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)<p></li>
<li>
<a name="void mx_gfx_dirty(const MX_RECT* rect)"><code>void mx_gfx_dirty(const MX_RECT* rect)</code></a>
<p>
<p><b>Mark part of the screen as dirty </b><p>
This function marks a portion of the screen as dirty.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)<p></li>
<li>
<a name="unsigned mx_gfx_poll(void)"><code>unsigned mx_gfx_poll(void)</code></a>
<p>
<p><b>Poll the DEGFX grpahics/keyboard/mouse system</b><p>
This function causes the conditions of the keyboard and mose to be read
from the system.  This should be done every time you want to read the keyboard
of the mouse.  Most drivers also redraw the screen during the poll.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)<p></li>
<li>
<a name="unsigned mx_gfx_pointer(int* x, int* y, int* b)"><code>unsigned mx_gfx_pointer(int* x, int* y, int* b)</code></a>
<p>
<p><b>Get the mouse position and state</b><p>
This function reads the mouse pointer position and button state.  The
function return non-zero if a new position has been read.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)

<p>If arguments are 0 then they are ignored.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)<p></li>
<li>
<a name="unsigned mx_gfx_hidepointer(unsigned hide)"><code>unsigned mx_gfx_hidepointer(unsigned hide)</code></a>
<p>
<p><b>Hide the pointer</b><p>
This only works if DEGFX draws the pointer.  This function does nothing on platforms that draw
thier own pointer i.e. Win32GDI.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)

<p>Unlike many other graphics libraries you dont have to hide the pointer
      when drawing on the screen.  This is not necessary with DEGFX because drawing
      takes place on an internal redraw buffer and the mouse is only added when
      blitting the innternal redraw buffer to the screen.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)<p></li>
<li>
<a name="unsigned mx_gfx_key(int* scan, int* ascii)"><code>unsigned mx_gfx_key(int* scan, int* ascii)</code></a>
<p>
<p><b>Return keypress information </b><p>
If new keypress information is available the function return non-zero, otherwise no key has been pressed.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)

<p>If arguments are 0 then they are ignored.  
(<a href="../include/degfx/coregfx.c">../include/degfx/coregfx.c</a>)<p></li>
</ul><p>Generated by <a href="http://www.deleveld.dds.nl/mxdoc/index.htm">MXDOC</a> 2.2 on Sun Feb  4 15:16:26 2007


</body></html>
